#include<stdio.h>
//ָ最好用指针
void main()
{
	char s1[4],s2[4],*p=s1,*q=s2;
	int num=0;
	while((*p=getchar())!='\n' && p<s1+4)
	{
		if((*p>='0' && *p<='9')||(*p>='a' && *p<='f')||(*p>='A' && *p<='F'))
		{
			*q=*p;
			//拼数
			if(*q>='0' && *q<='9') num=num*16+*q-'0';
			else if(*q>='A' && *q<='F') num=num*16+*q-'A'+10;
			else num=num*16+*q-'a'+10;
			q++;
		}
		p++;
	}
	printf("%sH=%d",s2,num);
}
//getchar()
void main()
{
	char s1[4],s2[4],c;
	int i,j,num;
	i=j=num=0;
	while((s1[i]=getchar())!='\n' && i<4)
	{
		if((s1[i]>='0' && s1[i]<='9')||(s1[i]>='a' && s1[i]<='f')||(s1[i]>='A' && s1[i]<='F'))
		{
			s2[j]=s1[i];
			if(s2[j]>='0' && s2[j]<='9') num=num*16+s2[j]-'0';
			else if(s2[j]>='A' && s2[j]<='F') num=num*16+s2[j]-'A'+10;
			else num=num*16+s2[j]-'a'+10;
			j++;
		}
		i++;
	}
	printf("%sH=%d",s2,num);
}
//gets()
void main()
{
	char s1[5]="0mfo",s2[4];
	int i,j,num;
	i=j=num=0;
	while(s1[i]!='\0' && i<4)
	{
		if((s1[i]>='0' && s1[i]<='9')||(s1[i]>='a' && s1[i]<='f')||(s1[i]>='A' && s1[i]<='F'))
		{
			s2[j]=s1[i];
			if(s2[j]>='0' && s2[j]<='9') num=num*16+s2[j]-'0';
			else if(s2[j]>='A' && s2[j]<='Z') num=num*16+s2[j]-'A'+10;
			else num=num*16+s2[j]-'a'+10;
			j++;
		}
		i++;
	}
	printf("%sH=%d",s2,num);//0fH=15
}
